- reporter = abuse_report.reporter
- user = abuse_report.user
%tr
  %th.d-block.d-sm-none
    %strong= _('User')
  %td
    - if user
      = link_to user.name, user
      .light.small
        = html_escape(_('Joined %{time_ago}')) % { time_ago: time_ago_with_tooltip(user.created_at).html_safe }
    - else
      = _('(removed)')
  %td
    - if reporter
      %strong.subheading.d-block.d-sm-none
        = _('Reported by %{reporter}').html_safe % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') }
      .light.gl-display-none.gl-sm-display-block
        = link_to(reporter.name, reporter)
      .light.small
        = time_ago_with_tooltip(abuse_report.created_at)
    - else
      = _('(removed)')
  %td
    %strong.subheading.d-block.d-sm-none
      = _('Message')
    .message
      = markdown_field(abuse_report, :message)
  %td
    - if user && user != current_user
      = render Pajamas::ButtonComponent.new(href: admin_abuse_report_path(abuse_report, remove_user: true), variant: :danger, block: true, button_options: { data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name }, confirm_btn_variant: "danger", remote: true, method: :delete }, class: "js-remove-tr" }) do
        = _('Remove user & report')
      - if user.blocked?
        = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, disabled: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do
          = _('Already blocked')
      - else
        = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do
          = _('Block user')
      = render Pajamas::ButtonComponent.new(href: [:admin, abuse_report], block: true, button_options: { data: { remote: true, method: :delete }, class: "js-remove-tr" }) do
        = _('Remove report')
